<script type="text/javascript">
    function registerStudent(){
        var idLanguage = -1;
       if ($('input[id=idJapannese]:checked').length > 0) {
           idLanguage = $('#idJapannese').val();
        }
        if($('input[id=idBurmese]:checked').length>0){
            idLanguage = $('#idBurmese').val();
        }
        if($('input[id=idEnglish]:checked').length>0){
            idLanguage = $('#idEnglish').val();
        }
        if($('input[id=idVietnamese]:checked').length>0){
            idLanguage = $('#idVietnamese').val();
        }        
        if(idLanguage!=-1){
            window.location.href = '<?php echo Yii::app()->createUrl("site/registerStudent") ?>'+"/lang/"+idLanguage;
        }
        else{
            alert('please select one of list languages!');
        }
        return false;
    }
</script>
<?php
$this->pageTitle=Yii::app()->name . ' - select language';
$this->breadcrumbs=array(
	'言語選択',
);
?>
<table>
    <tbody>
        <tr>
            <td style="color:blue">
                <?php echo Yii::t('strings','Please select the input language of the application form.') ?>
            </td>
        </tr>
        <tr>
            <td style="border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; padding-top: 20px">
                <table>
                    <tbody>
                        <tr>
                            <td>
                                <?php echo CHtml::radioButton('languages', false, array('value'=>0, 'id'=>'idJapannese')) ?>
                               &nbsp;&nbsp;&nbsp; <?php echo Yii::t('strings','Japanese') ?>
                            </td>
                            <td>
                              <?php echo CHtml::radioButton('languages', false, array('value'=>1, 'id'=>'idBurmese')) ?>  
                              &nbsp;&nbsp;&nbsp;<?php echo Yii::t('strings','Burmese') ?>
                            </td>
                            <td>
                                <?php echo CHtml::radioButton('languages', false, array('value'=>2, 'id'=>'idEnglish')) ?>
                               &nbsp;&nbsp;&nbsp; <?php echo Yii::t('strings','English') ?>
                            </td>
                            <td>
                                <?php echo CHtml::radioButton('languages', false, array('value'=>3, 'id'=>'idVietnamese')) ?>
                               &nbsp;&nbsp;&nbsp; <?php echo Yii::t('strings','Vietnamese') ?>
                            </td>
                        </tr>                      
                    </tbody>
                </table>                       
            </td>
        </tr>
        <tr>
            <td style="color: blue">
                <?php echo Yii::t('strings','※Before filling out the application form, please read the following things:') ?>
            </td>
        </tr>
         <tr>
           <td>
            <?php echo Yii::t('strings','① Please read TOKYO SCHOOL the rules clearly and agree completely with them, respect for them. ') ?>     
           </td>
        </tr>
        <tr>
            <td>
           <?php echo Yii::t('strings','② Please pay tuition fees on the specified date.') ?>      
            </td>
        </tr>
        <tr>
            <td style="text-align: right;">
         
                <?php echo CHtml::submitButton('', array(
                    'id'=>'select_language_continue',
                    'onclick'=>'return registerStudent();'
                )) ?>
            </td>
        </tr>
    </tbody>
</table>